# -*- coding: utf-8 -*-
"""
-------------------------------------------------
Project Name: luffcity_study_code
File Name: arrayjm.py
Author: kij
Create Date: 2021/8/25
-------------------------------------------------
"""
import base64
from urllib import parse


def jm_str(str1):

    daijiema = base64.b64decode(str1.encode(encoding='utf-8')).decode('latin1')
    xinjiemi = []
    for i in range(len(daijiema)):
        xinjiemi.append('{0:02X}'.format(ord(daijiema[i])))
    daijiemi = parse.unquote("%" + "%".join(xinjiemi))
    return daijiemi

def jm_array(array_list,position):
    new_array = []
    for item in array_list :
        new_array.append(jm_str(item))
    result_array = []
    result_array.extend(new_array[position:])
    result_array.extend(new_array[:position])

    return result_array


if __name__ == "__main__":
    print('开始解密')
